package com.example.deploysinggle.test1.common.exeptions;

import com.example.deploysinggle.test1.common.enums.ErrorEnum;
import lombok.Data;
import lombok.ToString;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2025/1/23 17:10
 */
@Data
@ToString
public class BizException extends Exception{

    private ErrorEnum errorEnum;

    public BizException(ErrorEnum errorEnum){
        super(errorEnum.getDesc());
        this.errorEnum=errorEnum;
    }

    public BizException(){
        super();
        this.errorEnum=ErrorEnum.SYSTEM_ERROR;
    }
}

